import java.util.Scanner;

public class Work2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("1"+"·"+"求和");
        System.out.println("2"+"·"+"求差");
        System.out.println("3"+"·"+"求积");
        System.out.println("4"+"·"+"求商");
        System.out.println("5"+"·"+"求余");
        System.out.println("Q"+"退出");

        System.out.println("请输入您想执行的操作");
        String ji = sc.nextLine();
        switch (ji){
            case "1":
                System.out.println("请输入2个数字");
                double j = sc.nextDouble();
                double s = sc.nextDouble();
                System.out.println(j+s);
                break;
            case "2":
                System.out.println("请输入2个数字");
                double a = sc.nextDouble();
                double b = sc.nextDouble();
                System.out.println(a-b);
                break;
            case "3":
                System.out.println("请输入2个数字");
                double c = sc.nextDouble();
                double d = sc.nextDouble();
                System.out.println(c*d);
                break;
            case "4":
                System.out.println("请输入2个数字");
                double e = sc.nextDouble();
                double f = sc.nextDouble();
                System.out.println(e/f);
                break;
            case "5":
                System.out.println("请输入2个数字");
                double g = sc.nextDouble();
                double h = sc.nextDouble();
                System.out.println(g%h);
                break;
            case "Q":
                System.out.println("退出");
                break;
        }

    }
}
